package BackTrackingPackage3;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author Lzm
 * @version 1.0
 */
public class solveNQueens_ {
  List<String> path = new ArrayList<>();
  List<List<String>> result = new ArrayList<>();
  /*public List<List<String>> solveNQueens(int n) {
    char[][] chessboard = new char[n][n];
    for (int i = 0 ; i < n ; i ++){
      Arrays.fill(chessboard[i],'.');
    }
  }*/
  public void backTracking(int n,int row,char[][]chessboard ){
    if (row == n){
      result.add(Array2List(chessboard));
      return;
    }
  }
  // 判断在row行,col列是否合法
  /*public boolean isValid(int row,int col,char[][]chessboard,int n){
    // 判断一行中是否有Q
    for (int i= 0 ; i < n - col ; i++){
      if (chessboard[row][i] == 'Q'){
        return false;
      }
    }
    // 判断一列是否合法
  }*/
  public List Array2List(char[][] chessboard) {
    List<String> list = new ArrayList<>();

    for (char[] c : chessboard) {
      list.add(String.copyValueOf(c));
    }
    return list;
  }
}
